package com.xxxy.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.xxxy.blockhandler.monitorBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class monitorController {
    @GetMapping("/monitor/hello")
    @SentinelResource(value = "helloResource",blockHandler = "helloBlockHandler",
            blockHandlerClass = monitorBlockHandler.class)
    public String hello(){
        return "hello sentinel";
    }
    @GetMapping("/associate")
    public String associate(){
        return "我是关联接口";
    }
}
